﻿namespace MicroCloud.Entity.KeyGenerator
{
    /// <summary>
    /// 定义<see cref="IKeyGenerator{TKey}"/>主键生成器
    /// </summary>
    /// <typeparam name="TKey"></typeparam>
    public interface IKeyGenerator<out TKey> where TKey : IEquatable<TKey>
    {
        /// <summary>
        /// 获取一个<see cref="IKeyGenerator{TKey}"/>类型的主键数据
        /// </summary>
        /// <returns></returns>
        TKey Create();

    }
}